/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link participants}.
 * </p>
 *
 * @author Cedric Nana
 * @see participants
 * @generated
 */
public class participantsWrapper implements participants,
	ModelWrapper<participants> {
	public participantsWrapper(participants participants) {
		_participants = participants;
	}

	@Override
	public Class<?> getModelClass() {
		return participants.class;
	}

	@Override
	public String getModelClassName() {
		return participants.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("ID", getID());
		attributes.put("Userid", getUserid());
		attributes.put("Username", getUsername());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long ID = (Long)attributes.get("ID");

		if (ID != null) {
			setID(ID);
		}

		String Userid = (String)attributes.get("Userid");

		if (Userid != null) {
			setUserid(Userid);
		}

		String Username = (String)attributes.get("Username");

		if (Username != null) {
			setUsername(Username);
		}
	}

	/**
	* Returns the primary key of this participants.
	*
	* @return the primary key of this participants
	*/
	@Override
	public long getPrimaryKey() {
		return _participants.getPrimaryKey();
	}

	/**
	* Sets the primary key of this participants.
	*
	* @param primaryKey the primary key of this participants
	*/
	@Override
	public void setPrimaryKey(long primaryKey) {
		_participants.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the i d of this participants.
	*
	* @return the i d of this participants
	*/
	@Override
	public long getID() {
		return _participants.getID();
	}

	/**
	* Sets the i d of this participants.
	*
	* @param ID the i d of this participants
	*/
	@Override
	public void setID(long ID) {
		_participants.setID(ID);
	}

	/**
	* Returns the userid of this participants.
	*
	* @return the userid of this participants
	*/
	@Override
	public java.lang.String getUserid() {
		return _participants.getUserid();
	}

	/**
	* Sets the userid of this participants.
	*
	* @param Userid the userid of this participants
	*/
	@Override
	public void setUserid(java.lang.String Userid) {
		_participants.setUserid(Userid);
	}

	/**
	* Returns the username of this participants.
	*
	* @return the username of this participants
	*/
	@Override
	public java.lang.String getUsername() {
		return _participants.getUsername();
	}

	/**
	* Sets the username of this participants.
	*
	* @param Username the username of this participants
	*/
	@Override
	public void setUsername(java.lang.String Username) {
		_participants.setUsername(Username);
	}

	@Override
	public boolean isNew() {
		return _participants.isNew();
	}

	@Override
	public void setNew(boolean n) {
		_participants.setNew(n);
	}

	@Override
	public boolean isCachedModel() {
		return _participants.isCachedModel();
	}

	@Override
	public void setCachedModel(boolean cachedModel) {
		_participants.setCachedModel(cachedModel);
	}

	@Override
	public boolean isEscapedModel() {
		return _participants.isEscapedModel();
	}

	@Override
	public java.io.Serializable getPrimaryKeyObj() {
		return _participants.getPrimaryKeyObj();
	}

	@Override
	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_participants.setPrimaryKeyObj(primaryKeyObj);
	}

	@Override
	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _participants.getExpandoBridge();
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.model.BaseModel<?> baseModel) {
		_participants.setExpandoBridgeAttributes(baseModel);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
		_participants.setExpandoBridgeAttributes(expandoBridge);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_participants.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new participantsWrapper((participants)_participants.clone());
	}

	@Override
	public int compareTo(
		de.hsmannheim.pepa.patientenportal.apanwep.model.participants participants) {
		return _participants.compareTo(participants);
	}

	@Override
	public int hashCode() {
		return _participants.hashCode();
	}

	@Override
	public com.liferay.portal.model.CacheModel<de.hsmannheim.pepa.patientenportal.apanwep.model.participants> toCacheModel() {
		return _participants.toCacheModel();
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.participants toEscapedModel() {
		return new participantsWrapper(_participants.toEscapedModel());
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.participants toUnescapedModel() {
		return new participantsWrapper(_participants.toUnescapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _participants.toString();
	}

	@Override
	public java.lang.String toXmlString() {
		return _participants.toXmlString();
	}

	@Override
	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_participants.persist();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof participantsWrapper)) {
			return false;
		}

		participantsWrapper participantsWrapper = (participantsWrapper)obj;

		if (Validator.equals(_participants, participantsWrapper._participants)) {
			return true;
		}

		return false;
	}

	/**
	 * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
	 */
	public participants getWrappedparticipants() {
		return _participants;
	}

	@Override
	public participants getWrappedModel() {
		return _participants;
	}

	@Override
	public void resetOriginalValues() {
		_participants.resetOriginalValues();
	}

	private participants _participants;
}